Copyright: Copyright © 1997  oSCAR


Calculator
Expression Calculator

Functions   Constants   Conversions

In Calculator, you can use (listed in decreasing priority):

•	arithmetic operators	* / + - ^

•	boolean operators	< > = & |

•	parenthesis	( )

•	functions, constants

Some common functions are associated with the Calculator buttons. For example, to calculate sin(1) you press the sin button first. In the editing box, you can see the expression sin(, where the parenthesis is not closed yet. Add the number 1 and close the parenthesis to have the expression sin(1). Its value, 0.84147098, appears on the Calculator, below the editing area.

You can use the Shift button to invoke inverse functions. For example, press the Shift button followed by pressing the sin button to edit the asin function.

 See list of Functions


Functions

sin	sin(radian)	{0..1}

asin	asin({0..1) 	radian

sinh	sinh(x) 	sinus hyberbolic of x

cos	cos(radian) 	{0..1}

acos	acos({0..1}) 	radian

cosh	cosh(x)	cosinus hyberbolic of x

tan	tan(radian)	{0..inf}

atan	atan({0..1}) 	radian

exp	exp(x) 	e^x

ln	ln(x) 	log in base e

log	log(x) 	log in base 10

deg	deg(rad) 	transforms radians into degrees

rad	rad(deg) 	transforms degrees into radians

fact	fact(x) 	factorial x!

Sqrt	sqrt(x) 	square root of 'x'

Fresnel Integral

Gamma Function

Error Function

Bessel Function

Chebyshev polynomial

Other functions

Constants

Conversions


Constants

Mathematical Constants

pi	3.14159265358979323846

e	2.71828182845904523536

Physical Constants

_c	2.9979e8 	m/s	Speed of light in free space

_e	8.8542e-12 	F/m	Permitivity in free space

_mi	4*pi*10e-7 	H/m	Permeability in free space

_q	1.60219e-19 	C	Elementary charge

_me	9.1095e-31 	kg	Free electron mass

_u	1.660531e-27	kg	Atomic mass unit

_mp	1.672614e-27	kg	Proton rest mass

_mn	1.674920e-27	kg	Neutron rest mass

_eV	1.60219e-19 	J	Energy unit (electron-volt)

_h	6.626e-34 	Js	Planck constant

_hr	1.05459 e-34 	Js	Reduced Planck Constant

_lc	2.4263096e-12	m	Compton wavelength of electron

_Ry	13.6058	eV	Ryberg energy

_ri	1.09737312e7	1/m	Rydberg constant

_kT	25.853	meV	Thermal energy

_NA	6.022045e23	Avogadro number

_f	9.648 6e4 	C/mol	Faraday constant

_a	7.297351e-3	Fine structure constant

_a0	5.2917715e-11	m	Bohr radius

_re	2.817939e-15	m	Electron radius

_mb	9.274096e-24	J/T	Bohr magnetron

_kB	1.3807e-23 	J/K	Boltzmann constant

_sb	5.66961e-8	Stefan-Boltzmann constant


Other Functions

min	min(a,b) =a if a<b else b

max	maxa,b) =a if a>b else b

comb	comb(n, k) 	= number of combinaisons for k object

n - total number of objects (n>=m) return 0 if error

perm	perm(m, n) 	=permutation mPn (0 if  error)

gcd	gcd(a, b) 	= Greatest Common Divisor between a & b

lcm	lcm(a, b) 	= Largest Common Multiple between a & b

frc	frc(x) 	= fractionnal part of 'x'

int	int(x) 	= integer part of 'x'

angle	Computes angle from cartesian position (x,y)

angle defined positive if y >0 and negative if y < 0

rand	rand(MaxNum) => Randomize {0..MaxNum}


Fresnel Integral

fresnel_s, fresnel_c, fresnel_f, fresnel_g

fresnel_s	fresnel_s(x) 	= Fresnel Integral SIN

fresnel_c	fresnel_c(x) 	= Fresnel Integral COS

Evaluates the fresnel integrals

f(x), g(x)

fresnel_f	fresnel_f(x)  = function f(x) related to the Fresnel Integral

fresnel_g	fresnel_f(x)  = function g(x) related to the Fresnel Integral

Evaluates the functions f(x) and g(x) related to the Fresnel integrals by means of the formulae


Gamma Function

gammag, lgammal

Computes the value of the gamma function at x

gammag	gamma(x)	Gamma Function

lgammal	lgamma(x)	Natural logarithm of Gamma Function

x - must be positive


Error Function

erf, erfc, nexperfc, inverrf

erf	erf(x)	Error Function

erfc	erfc(x) 	Complementary Error Function"},

Computes the error function erf(x) and Complementary error function erfc(x)

When x>26 then erf(x)=1 and erfc(x)=0

When x< -5.5 then erf(x)=-1 and erfc(x)=2;

nexperfc	Non exp erfc computes

i.e.

Inverse error function y(x)

inverrf	inverf(x,minx)

Evaluates the inverse error function y(x) where

x - 	it is necessary that -1 <x < 1

if |x| > 0.8 then value of x is not used in the procedure

minx	if |x| <= 0.8 then value minx is not used in the procedure

if |x|> 0.8 then minx has to contain the value of 1-|x|.

In the case that |x| is in the neighborhood of 1, cancelation of digits take place in the calculation of 1-|x|

If the value 1-|x| is known exactly from another source then minx has to contain this value, witch will give better results


Bessel Functions

J(x), Y(x), I(x), K(x), Spherical, Ya(x)

Bessel function J

bessj0	bessj0(x)

Bessel function J0(x) of the 1st kind of order 0

bessj1	bessj1(x)

Bessel function J1(x) of the 1st kind of order 1

bessj	bessj [k] (x)

Bessel function Jk(x) of the 1st kind in order k

Bessel function Y (Weber's function )

bessy0	bessy0(x)

Bessel function Y0(x) of the 2nd kind of order 0

bessy1	bessy0(x)

Bessel function Y1(x) of the 2nd kind of order 1

bessy	bessy [k] (x)

Bessel function Yk(x) of the 2nd kind of order k

Modified Bessel function I

bessi0	bessi0(x)

Modified Bessel function I0(x) of the 1st kind of order 0

bessi1	bessi1(x)

Modified Bessel function I1(x) of the 1st kind of order 1

bessi	bessi [k] (x)

Modified Bessel function Ik(x) of the 1st kind of order k

Modified Bessel function K

bessk0	bessk1(x)

Mod. Bessel function K0(x) of the third kind of order 0

bessk1	bessk1(x)

Mod. Bessel function K1(x) of the third kind of order 1

bessk	bessk [k] (x)

Mod. Bessel function Kk(x) of the third kind of order k

Spherical Bessel functions

spbessj	spbessj[k](x) => Spherical Bessel funct. Jk+0.5(x)

Bessel function of the second kind (Neumann's functions)

neumann	neumann(a,x)

Neumann function Ya(x) of the 2nd kind of order a

neumann1	neumann1(a,x)

Neumann function Ya+1(x) of the 2nd kind of order a


Chebyshev polynomial

chepol	chepol(n,x)

Computes the value of the Chebyshev polynomial Tn(x)


Conversion
Conversions

Length

ft_m	ft_m(foot)        	Foot to meter

yd_m	yd_m(yard) 	Yard to meter

in_m	in_m(inch) 	Inches to meter

ps_m	ps_m(parsec) 	Parsec to meter

ly_m	ly_m(ly) 	Light Year to meter

au_m	au_m(au)       	Astronomical unit to meter

Temperature

c_k	c_k(celsius) 	Celsius to Kelvin

fh_k	fh_k(farenheit) 	Farenheit to Kelvin

fh_c	fh_c(farenheit) 	Farenheit to Celsius

k_c	k_c(kelvin) 	Kelvin to Celsius

c_fh	c_fh(celsius) 	Celsius to Farenheit

k_fh	k_fh(kelvin) 	Kelvin to Farenheit

Other

gal_l	gal_l(galon) 	Galon to liter

pt_l	pt_l(pint)	 	Pint to liter

oz_l	oz_l(oz) 	Oz to liter

in3_l	in3_l(cubInc) 	Cubic Inch to liter

l_m3	l_m3(liter)         	Liter to cubic meter

pd_kg	pd_kg(pound) 	Pound to kilogram

phe	phe(wavelength[µm]) Calculate Photon energy [eV]


Test